package com.yeheng.entity;

import com.yeheng.Myannotion.MyParam;
import com.yeheng.validationgroup.B;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @PackgeName: com.yeheng.entity
 * @ClassName: Dept
 * @Author: YH
 * Date: 2020/12/31 22:23
 * project name: homework1
 * @Version:
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Dept {
    @MyParam(min = 1,max = 16,message = "部门不能不选哦")
    private Integer did;

    @Pattern(regexp = "[\u4e00-\u9fa5]{3,6}",message = "不要乱写哦",groups = B.class)
    private String dname;

    private Boolean state;
}
